package com.example.yanghuiliao;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@SpringBootApplication
@RestController
@RequestMapping("admin/")
public class YanghuiliaoApplication {

    @RequestMapping("home")
    public String home(HttpServletRequest httpServletRequest){
        String name="yanghui";
        int count=1;
        return "欢迎您"+name+",这是你第"+count+"登录系统";
    }

    @RequestMapping(value = "login",method = RequestMethod.POST)
    @ResponseBody
    public String login(String username,String password){
        return "index";
    }

    public static void main(String[] args) {
        SpringApplication.run(YanghuiliaoApplication.class, args);
    }

}
